/**
 * 
 */
package br.com.devschool.service;

import java.util.List;

import br.com.devschool.entity.Aluno;
import br.com.devschool.persistence.AlunoDAO;
import br.com.devschool.util.BaseService;
import br.com.devschool.util.GenericDAO;

/**
 * @author ATILLA
 *
 */
public class AlunoService extends BaseService implements GenericDAO<Aluno> {

	private AlunoDAO objDao;

	@Override
	public boolean save(Aluno object) throws Exception {
		objDao = new AlunoDAO();
		return objDao.save(object);
	}

	@Override
	public boolean update(Aluno object) throws Exception {
		objDao = new AlunoDAO();
		return objDao.update(object);
	}

	@Override
	public boolean merge(Aluno object) throws Exception {
		objDao = new AlunoDAO();
		return objDao.merge(object);
	}

	@Override
	public boolean delete(Aluno object) throws Exception {
		objDao = new AlunoDAO();
		return objDao.delete(object);
	}

	@Override
	public Aluno findById(int pkey) throws Exception {
		objDao = new AlunoDAO();
		return objDao.findById(pkey);
	}

	@Override
	public List<Aluno> findAll() throws Exception {
		objDao = new AlunoDAO();
		return objDao.findAll();
	}

	@Override
	public int nextvalById() throws Exception {
		objDao = new AlunoDAO();
		return objDao.nextvalById();
	}
}
